package org.dromara.finance.domain.bo;

import org.dromara.finance.domain.Bill;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 收款登记业务对象 bill
 *
 * @author xxy
 * @date 2025-08-19
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = Bill.class, reverseConvertGenerate = false)
public class BillBo extends BaseEntity {

    /**
     * 主键
     */
    private Long id;

    /**
     * 账单类型 1-收款，2-付款
     */
    @NotNull(message = "账单类型 1-收款，2-付款不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long billType;

    /**
     * 关联合同id
     */
    @NotNull(message = "关联合同id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long contractId;

    /**
     * 收付款金额
     */
    @NotNull(message = "收付款金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal billAmount;

    /**
     * 入账日期
     */
    @NotNull(message = "入账日期不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date recordDate;

    /**
     * 相关凭证号
     */
    @NotBlank(message = "相关凭证号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String voucherNum;

    /**
     * 备注
     */
    private String remark;

    private String saleContractNum;
    private String purchaseContractNum;
    private String projectName;
    private Long customerId;
    private Long supplierId;
    private Long transportSection;

}
